<?php include( "templates/include/header.php" );
  include( "templates/include/adminHeader.php" );?>

      <div id="adminHeader">
        <h2>Administation des Renseignements</h2>
        <p>Vous &ecirc;tes connect&eacute; en tant que <b><?php echo htmlspecialchars( $_SESSION['username']) ?></b>. <a href="admin.php?action=logout"?>Se D&eacute;connecter</a></p>
      </div>

      <h1>Les Renseignements</h1>

<?php if ( isset( $results['errorMessage'] ) ) { ?>
        <div class="errorMessage"><?php echo $results['errorMessage'] ?></div>
<?php } ?>


<?php if ( isset( $results['statusMessage'] ) ) { ?>
        <div class="statusMessage"><?php echo $results['statusMessage'] ?></div>
<?php } ?>
        <?php
          foreach( $results['info'] as $info ) { ?>
            <table class="CycleFade1" onclick="location='admin.php?action=editInfo&amp;infoId=<?php echo $info->id?>'" >
          	  <tr>
                <td>
                  <?php
                    if ( isset( $info->content ) ) {
                      echo( $info->content );
                    }
                  ?>
                </td>
              </tr>
            </table>
          <?php }
          if( !$results['info'] ) {?>
            <a href="admin.php?action=newInfo">Ajouter des Renseignements</a>
	  <?php } ?>


<?php
  include( "templates/include/adminFooter.php" );
  include( "templates/include/footer.php" ); ?>
